//
//  ImageLoader.h
//  CreditHub
//
//  Created by chenglang on 2024/9/17.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ImageLoader : NSObject
+ (instancetype)sharedInstance;
- (void)loadImageFromURL:(NSURL *)url imageView:(UIImageView *)imageView completion:(void (^)(UIImage *image, NSError *error))completion;
- (NSData *)compressImage:(UIImage *)image toLessThanSize:(NSUInteger)targetSize;
@end

NS_ASSUME_NONNULL_END
